<?=$header?>

<body>

    <?=$js?>

	<?=$navigate?>

	<!-- MAIN CONTENT -->

	<div id="content">

		

		<div class="page-full-width cf">

            <?=$sidebarleft?>

            <div class="side-content fr">

			<div class="content-module">

			

				<div class="content-module-heading cf">

				

					<h3 class="fl"><?=$title_page?></h3>

					<span class="fr expand-collapse-text">Click to collapse</span>

					<span class="fr expand-collapse-text initial-expand">Click to expand</span>

				

				</div> <!-- end content-module-heading -->

				

				

				<div class="content-module-main">

                <?php

                    $typeMess =  $this->session->userdata('typeMess');

                    $message = $this->session->userdata('message');

                    if(!empty($message)){

                        if($typeMess == 'success'){

                            echo "<div class='information-box round'>$message </div>";

                        }else{

                            echo "<div class='error-box round'>$message </div>";

                        }

                        $this->session->unset_userdata('message');

                        $this->session->unset_userdata('typeMess');

                    }

                ?>

					<p><?php echo anchor('staff/addStaff', 'Add', array('class'=>'button round blue image-right ic-add text-upper')) ?></p> 

					<form name="kform" id="kform" action="<?=$this->config->item('main_url').'/staff/action'?>" method="post">

                    <table id="datatable">

						<thead>

							<tr>

								<th><input type="checkbox" id="table-select-all" onclick="checkAll();"></th>

								<th>Fullname</th>
                                
                                <th>Department</th>

								<th>Mobile</th>

								<th>Address</th>

								<th>Gender</th>

                                <th>Change Status</th>

                                <th>Action</th>

							</tr>

						</thead>

						<tfoot>

							<tr>

								<td colspan="5" class="table-footer">

									<label for="table-select-actions">With selected:</label>



									<select id="table-select-actions" name="action">

										<option value="option1">Delete</option>

										<option value="option2">Export</option>

										<option value="option3">Archive</option>

									</select>
                                    
                                    <a href="javascript:void(0)" onclick="subform();" class="round button blue text-upper small-button">Apply to selected</a>
                                    
								</td>

								

							</tr>

						

						</tfoot>

						

						<tbody>

                            <?php

                                foreach($list as $k=>$item):

                            ?>

							<tr>

								<td><input type="checkbox" value="<?=$item['idstaff']?>" name="checklist[]" id="check_box" /></td>

								<td><?=$item['firstname'].' '.$item['lastname']?></td>
                                
                                <td><?=$item['name']?></td>
        
								<td><?=$item['mobile']?></td>

                                <td><?= $item['address'] ?></td>

                                <td><?php if($item['gender'] == 1): echo 'Male'; else: echo 'Female'; endif; ?></td>

								<td><?php if($item['active']==1){echo 'Actived | '.anchor("staff/changeStatusStaff/".$item['idstaff'], 'Disable');} else {echo 'Disabled | '.anchor('staff/changeStatusStaff/'.$item['idstaff'], 'Active');}?></td>

								<td>

                                    <?=anchor($this->config->item('main_url').'/staff/updateStaff/'.$item['idstaff'], ' ', array('class'=>'table-actions-button ic-table-edit'));?>

                                    <?=anchor($this->config->item('main_url').'/staff/deleteStaff/'.$item['idstaff'], ' ', array('class'=>'table-actions-button ic-table-delete', 'onclick'=>"return confirm('Are you sure delete this Staff?')"));?>

								</td>

							</tr>

                            <?php

                                endforeach;

                            ?>

						</tbody>

						

					</table>

					</form>

					<div class="stripe-separator"><!--  --></div>

					

					<p>When you resize the page, all the elements inside the page will resize as well, this being a liquid or fluid layout.</p>

					

				</div> <!-- end content-module-main -->

			

			</div> <!-- end content-module -->

		  </div>

		</div> <!-- end full-width -->

			

	</div> <!-- end content -->

	

	

	

	<!-- FOOTER -->

	<?=$footer?>

    <!-- end footer -->



</body>

</html>